package com.lzw.mapper.dormitoryAdmin;

import com.lzw.pojo.LeaveRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface LeaveRecordMapper {
    List<LeaveRecord> list(@Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    void update(LeaveRecord leaveRecord);

    void delete(@Param("ids") List<Integer> ids);

    @Select("SELECT * FROM dormitorymanagement.leaverecord WHERE leave_id = #{leaveId}")
    LeaveRecord getById(Integer id);
}
